<template>
  <el-table
    :data="tableData3"
    height="400px"
    border
    @row-click="handleCurrentChange"
    :header-cell-style="{background:'#f4f4f4'}"
    style="width: 100%"
  >
    <el-table-column type="index" label="序号" align="center" width="50"></el-table-column>
    <el-table-column prop="NetOrderId" align="center" label="订单编码"></el-table-column>
    <el-table-column prop="GridName" align="center" label="格子号" width="80"></el-table-column>
  </el-table>
</template>

  <script>
  import {commitTechOrderByTechType,
  } from '@/api/sorting'
export default {
  props: {
    tableData3: {
      type: Array
    }
  },
  data() {
    return {};
  },
  methods:{
      handleCurrentChange(val){
        this.$confirm('是否过站?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
        }).then(() => {
            this.currentRow = val;
            commitTechOrderByTechType({
                techType: 10,
                netOrderId: this.currentRow.NetOrderId,
                isPass: true
            }).then(res => {
            if (parseInt(res.Code) === 1) {
                this.$message({
                type: "success",
                message: "过站成功"
                });
            }
            this.$parent.init()
            });
        }).catch(() => {
            this.$message({
            type: 'info',
            message: '已取消过站'
            });          
        });
      }
  }
};
</script>